use crate::{Ime, Keyboard, Mouse, Touch, Wheel, Win};

pub trait IntoEvt<P: Win, T> {
	fn to_evt(&self, win: P::WinRef<'_>) -> Option<T>;
}

impl<P: Win> IntoEvt<P, Ime> for &Ime {
	fn to_evt(&self, _: <P as Win>::WinRef<'_>) -> Option<Ime> {
		Some((*self).clone())
	}
}
impl<P: Win> IntoEvt<P, Keyboard> for &Keyboard {
	fn to_evt(&self, _: <P as Win>::WinRef<'_>) -> Option<Keyboard> {
		Some((*self).clone())
	}
}
impl<P: Win> IntoEvt<P, Mouse> for &Mouse {
	fn to_evt(&self, _: <P as Win>::WinRef<'_>) -> Option<Mouse> {
		Some((*self).clone())
	}
}
impl<P: Win> IntoEvt<P, Touch> for &Touch {
	fn to_evt(&self, _: <P as Win>::WinRef<'_>) -> Option<Touch> {
		Some((*self).clone())
	}
}
impl<P: Win> IntoEvt<P, Wheel> for &Wheel {
	fn to_evt(&self, _: <P as Win>::WinRef<'_>) -> Option<Wheel> {
		Some((*self).clone())
	}
}
